package com.zs.leymovie.constants;

import android.text.TextUtils;
import android.widget.Toast;

import com.zs.leymovie.BaseApp;

/**
 * 数据加载url定义类
 */

public class UrlConstants {

    public static final String SHOW_ID = "showid";
    public static final String CITY_ID = "cityid";
    public static final String CURRENTDAY = "today";
    //即将放映-主页url
    public static String getComingUrl(String city_id) {
        String comingUrl = "http://mobile2.leying365.com/movie/coming?pver=1.0&city_id=" + city_id + "&session_id=&ver=3.1.22&group=0&source=105001&width=128&.sig=cb7bac3a2de3f621c67a1ce46fa03d27";
        return comingUrl;
    }

    //城市定位
    public static String getCityId(String city_id) {
        String city_location = "http://mobile2.leying365.com/city/list?city_id=" + city_id + "&pver=1.0&session_id=&ver=3.1.22&group=0&source=105001&.sig=4516d4806627f355e0b45540e1e8fdac";
        return city_location;
    }

    //正在放映-主页url
    public static String getOnlineUrl(String city_id) {
        String nowshowing = "http://mobile2.leying365.com/movie/online?pver=1.0&city_id=" + city_id + "&session_id=&ver=3.1.22&group=0&source=105001&width=128&.sig=cb7bac3a2de3f621c67a1ce46fa03d27";
        return nowshowing;
    }

    //影片头部广告
    public static String getBannerUrl(String city_id) {
        String bannerUrl = "http://mobile2.leying365.com/advert/list?pver=1.0&city_id="+city_id+"&promotion_type=7&session_id=&ver=3.0.0&group=0&source=105001&.sig=1dd061785de20bb2d416c647d33bc410";
        return bannerUrl;
    }

    //正在放映详情
    public static String getShowingInfoUrl(String city_id,String movie_id) {
        String showingInfoUrl = "http://mobile2.leying365.com/movie/movie-info?city_id="+city_id+"&session_id=&movie_id=" + movie_id + "&source=105001&width=128&pver=1.0&ver=3.1.22&client_id=1465697&group=0&.sig=d0298942b16a30c8fdfebe19fe60257f";
        return showingInfoUrl;
    }

    //即将放映详情
    public static String getComingInfoUrl(String city_id,String movie_id) {
        String comingIngoUrl = "http://mobile2.leying365.com/movie/movie-info?city_id=159&session_id=&movie_id=" + movie_id + "&source=105001&width=128&pver=1.0&ver=3.1.22&client_id=1465697&group=0&.sig=f2256d52d5c5d2a682a82041615dce4a";
        return comingIngoUrl;
    }

    //详情评论
    public static String getComment(String city_id,String movie_id) {
        String commentUrl = "http://mobile2.leying365.com/movie/get-movie-comments?city_id="+city_id+"&session_id=&movie_id=" + movie_id + "&source=105001&start_id=0&pver=1.0&ver=3.1.22&group=0&.sig=e23898ecfa630e824dd0a550fc2c2478";
        return commentUrl;
    }

    public static void getPrompt() {
        Toast.makeText(BaseApp.getInstance(), "您的网络不正常，请检查网络后在尝试。", Toast.LENGTH_LONG).show();
    }


    /**
     * 点击城市定位的URL
     */
    public static final String LOCATION_URL = "http://mobile2.leying365.com/city/list?city_id=159&pver=1.0&session_id=&ver=3.1.22&group=0&source=105001&.sig=4516d4806627f355e0b45540e1e8fdac";

    /**
     * 获取影院信息的URl， 默认获取深圳的
     */

    public static String getYY_URL(String city_id, String movie_id) {
        if (movie_id == null || TextUtils.equals(movie_id, "") || movie_id.length() <= 0) {
           return "http://mobile2.leying365.com/cinema/list?city_id=" + city_id + "&session_id=&movie_id=&source=105001&pver=1.0&ver=3.1.22&is_add_card=0&group=0&.sig=be19dfb551e9cc27afbbf76ad1747568";
        }
        String YY_URL = "http://mobile2.leying365.com/cinema/list?city_id=" + city_id + "&session_id=&movie_id=" + movie_id + "&source=105001&pver=1.0&ver=3.1.22&is_add_card=0&group=0&.sig=be19dfb551e9cc27afbbf76ad1747568";
        return YY_URL;
    }

    /**
     * 点击影院信息跳转到详情页面
     */
    public static String getMoveData(String city_id, String cinema_id) {
        String MD_URL = "http://mobile2.leying365.com/cinema/play-info?city_id=" + city_id + "&session_id=&cinema_id=" + cinema_id + "&source=105001&width=128&pver=1.0&ver=3.1.22&group=0&.sig=d46a58d5e10eafd0c8b0226c4c170c6b";
        return MD_URL;
    }

    /**
     * 活动
     */
    public static final String ACTIVITY = "http://mobile2.leying365.com/promo/promo-list?city_id=159&pver=1.0&session_id=&ver=3.1.22&group=0&source=105001&.sig=4516d4806627f355e0b45540e1e8fdac";
    /**
     * 影院选座
     */
    public static String getXuanZUO(String city_id,String show_id){
          final String XUANZUO = "http://mobile2.leying365.com/play/seat?city_id="+city_id+"&session_id=&source=105001&width=128&pver=3.1&show_id="+show_id+"&ver=3.1.22&group=0&type=1&.sig=b341550afea4d4bfa07e889328363833";
         return XUANZUO;
    }
}
